package com.neusoft.yiyang.bed.client;

import com.neusoft.yiyang.common.entity.bed.Bed;
import com.neusoft.yiyang.common.entity.customer.Customer;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "customer-service")
public interface CustomerClient {

    // 查询客户信息
    @GetMapping("/customers/search")
    List<Customer> searchCustomers(
            @RequestParam(required = false) String customerName,
            @RequestParam(required = false) Integer customerType,
            @RequestParam(required = false) Integer dietTagId,
            @RequestParam(required = false) Integer caretakerId);

    @PostMapping("/customers/getCustomerByBed")
    List<Customer> getCustomerByBed(@RequestBody List<Bed> beds);

    @GetMapping("/customers/getCustomerHasBed")
    List<Customer> getCustomerHasBed();

    @GetMapping("/customers/changeBed")
    void changeBed(@RequestParam Integer customerId, @RequestParam Integer bedId);

}
